home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
btrtest
/
btrtest.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
15KB
|
561 lines
VERSION 2.00
Begin Form EmpMst
BackColor = &H00C0C0C0&
Caption = "Btrieve Test Program"
ClientHeight = 3420
ClientLeft = 1140
ClientTop = 1470
ClientWidth = 7635
Height = 3825
Icon = BTRTEST.FRX:0000
Left = 1080
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3420
ScaleWidth = 7635
Top = 1125
Width = 7755
Begin TextBox HPhone
Height = 285
Left = 3600
TabIndex = 26
Top = 3015
Width = 1860
End
Begin TextBox WPhone
Height = 285
Left = 3600
TabIndex = 25
Top = 2655
Width = 1860
End
Begin TextBox ZipCod
Height = 285
Left = 3600
TabIndex = 4
Top = 2295
Width = 1095
End
Begin TextBox SocSec
Height = 285
Left = 3600
TabIndex = 3
Top = 1935
Width = 2175
End
Begin TextBox FstNam
Height = 285
Left = 3600
TabIndex = 2
Top = 1575
Width = 2190
End
Begin TextBox LstNam
Height = 285
Left = 3600
TabIndex = 1
Top = 1215
Width = 2190
End
Begin ListBox EmpList
Height = 2370
Left = 90
TabIndex = 10
Top = 900
Width = 2265
End
Begin TextBox EmpNum
Height = 285
Left = 3600
TabIndex = 0
Top = 855
Width = 735
End
Begin Frame Frame3
BackColor = &H00C0C0C0&
Caption = "Data Access"
Height = 3210
Left = 5895
TabIndex = 16
Top = 90
Width = 1680
Begin Frame Frame4
BackColor = &H00C0C0C0&
Caption = "Select By"
Height = 1230
Left = 90
TabIndex = 21
Top = 1845
Width = 1500
Begin OptionButton SelectByFirst
BackColor = &H00C0C0C0&
Caption = "First Name"
Height = 240
Left = 90
TabIndex = 23
Top = 900
Width = 1365
End
Begin OptionButton SelectByLast
BackColor = &H00C0C0C0&
Caption = "Last Name"
Height = 240
Left = 90
TabIndex = 22
Top = 585
Width = 1365
End
Begin OptionButton SelectByNum
BackColor = &H00C0C0C0&
Caption = "Employee #"
Height = 240
Left = 90
TabIndex = 24
Top = 270
Width = 1320
End
End
Begin CommandButton LastCommand
Caption = "Last"
Height = 330
Left = 315
TabIndex = 18
Top = 1485
Width = 1050
End
Begin CommandButton PreviousCommand
Caption = "Previous"
Height = 330
Left = 315
TabIndex = 17
Top = 1080
Width = 1050
End
Begin CommandButton NextCommand
Caption = "Next"
Height = 330
Left = 315
TabIndex = 19
Top = 675
Width = 1050
End
Begin CommandButton FirstCommand
Caption = "First"
Height = 330
Left = 315
TabIndex = 20
Top = 270
Width = 1050
End
End
Begin Frame Frame2
BackColor = &H00C0C0C0&
Caption = " Action"
Height = 690
Left = 90
TabIndex = 11
Top = 90
Width = 5685
Begin CommandButton ExitCommand
Caption = "Exit"
Height = 330
Left = 4500
TabIndex = 15
Top = 270
Width = 1050
End
Begin CommandButton DeleteCommand
Caption = "Delete"
Height = 330
Left = 3060
TabIndex = 14
Top = 270
Width = 1050
End
Begin CommandButton ChangeCommand
Caption = "Change"
Height = 330
Left = 1620
TabIndex = 13
Top = 270
Width = 1050
End
Begin CommandButton AddCommand
Caption = "Add"
Height = 330
Left = 135
TabIndex = 12
Top = 270
Width = 1050
End
End
Begin Label Label5
BackColor = &H00C0C0C0&
Caption = "Home Phone"
Height = 195
Left = 2430
TabIndex = 28
Top = 3060
Width = 1140
End
Begin Label Label12
BackColor = &H00C0C0C0&
Caption = "Work Phone"
Height = 195
Left = 2430
TabIndex = 27
Top = 2700
Width = 1095
End
Begin Label Label4
BackColor = &H00C0C0C0&
Caption = "Zip Code"
Height = 210
Left = 2430
TabIndex = 9
Top = 2340
Width = 975
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "SSN"
Height = 210
Left = 2430
TabIndex = 8
Top = 1980
Width = 960
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "First Name"
Height = 210
Left = 2430
TabIndex = 5
Top = 1620
Width = 1005
End
Begin Label Label6
BackColor = &H00C0C0C0&
Caption = "Last Name"
Height = 210
Left = 2430
TabIndex = 7
Top = 1260
Width = 1020
End
Begin Label Label7
BackColor = &H00C0C0C0&
Caption = "Employee #"
Height = 210
Left = 2430
TabIndex = 6
Top = 900
Width = 1095
End
End
Sub AddCommand_Click ()
KeyBufLen% = Len(KeyBuff)
SetBuff
BufLen% = Len(DataBuff)
Status% = BTRCALL(BINSERT, POSBLOCK, DataBuff, BufLen%, KeyBuff, KeyBufLen%, KeyNum%)
If Status% <> 0 Then
BtrErr (Status%)
Else
PaintData
Response% = MsgBox("Add Action Successful", 64, "File Action Message